package com.ma.disk.service;

import com.obs.services.model.DownloadFileResult;
import com.obs.services.model.PutObjectResult;

import java.io.*;
import java.util.Map;

public interface ObsService {
    /**
     * author:"maliangcheng" <2516749060@qq.com>
     * @param objectName
     * @param inputStream
     * @return
     * 文件上传
     */
    PutObjectResult putOb(String objectName, InputStream inputStream);

    /**
     * author:"maliangcheng" <2516749060@qq.com>
     * @param objectName
     * @param outputStream
     * @throws IOException
     * 文件下载
     */
    void downOb(String objectName, OutputStream outputStream) throws IOException;

    /**
     * author:"maliangcheng" <2516749060@qq.com>
     * @param fileNameBucket
     * @return
     * 获得文件分享链接
     */
    String getFileUrl(String fileNameBucket);

    /**
     * author:"maliangcheng" <2516749060@qq.com>
     * @param fileNameBucket
     * @return
     */
    Map deleteFile(String fileNameBucket);
}
